<?xml version="1.0" encoding="utf-8"?>
<openerp>
	<data>
		<record id="view_param_internal_move_report" model="ir.ui.view">
			<field name="name">view.param.internal.move.report</field>
			<field name="model">param.internal.move.report</field>
			<field name="type">form</field>
			<field name="arch" type="xml">
				<form string="Transfer Report">
					<notebook colspan="4">
						<page string="Date">
							<group>
								<field name="date_filter_selection" on_change="onchange_date_filter_selection(date_filter_selection)"/>
								<field name="date_from" attrs="{'invisible': [('date_filter_selection','!=','date_sel')]}"/>
								<field name="date_to" attrs="{'invisible': [('date_filter_selection','!=','date_sel')]}"/>
							</group>
						</page>
						<page string="IM No.">
							<group>
								<field name="im_filter_selection" on_change="onchange_im_filter_selection(im_filter_selection)"/>
								<field name="im_def_from" attrs="{'invisible': [('im_filter_selection','!=','def')], 'required': [('im_filter_selection','=','def')]}"
									options='{"quick_create": false}'/>
								<field name="im_def_to" attrs="{'invisible': [('im_filter_selection','!=','def')], 'required': [('im_filter_selection','=','def')]}"
									options='{"quick_create": false}'/>
								<field name="im_input_from"
									attrs="{'invisible': [('im_filter_selection','!=','input')], 'required': [('im_filter_selection','=','input')]}"/>
								<field name="im_input_to"
									attrs="{'invisible': [('im_filter_selection','!=','input')], 'required': [('im_filter_selection','=','input')]}"/>	
							</group>
							<field name="im_no_ids"
								attrs="{'invisible': [('im_filter_selection','!=','selection')], 'required': [('im_filter_selection','=','selection')]}" nolabel="1">
								<tree>
									<field name="name" string="IM No"/>
									<field name="state" invisible="1"/>
								</tree>
							</field>	
						</page>
						<page string="Requestor">
							<group>
								<field name="requestor_filter_selection" on_change="onchange_requestor_filter_selection(requestor_filter_selection)"/>
								<field name="requestor_def_from" attrs="{'invisible': [('requestor_filter_selection','!=','def')], 'required': [('requestor_filter_selection','=','def')]}"/>
								<field name="requestor_def_to" attrs="{'invisible': [('requestor_filter_selection','!=','def')], 'required': [('requestor_filter_selection','=','def')]}"/>
								<field name="requestor_input_from"
									attrs="{'invisible': [('requestor_filter_selection','!=','input')], 'required': [('requestor_filter_selection','=','input')]}"/>
								<field name="requestor_input_to"
									attrs="{'invisible': [('requestor_filter_selection','!=','input')], 'required': [('requestor_filter_selection','=','input')]}"/>
							</group>
							<field name="requestor_name_ids" 
								attrs="{'invisible': [('requestor_filter_selection','!=','selection')], 'required': [('requestor_filter_selection','=','selection')]}" nolabel="1">
								<tree>
									<field name="name" string="Requestor Name"/>
								</tree>
							</field>
						</page>
						<page string="Project">
							<group>
								<field name="project_filter_selection" on_change="onchange_project_filter_selection(project_filter_selection)"/>
								<field name="project_def_from" attrs="{'invisible': [('project_filter_selection','!=','def')], 'required': [('project_filter_selection','=','def')]}"
									options='{"quick_create": false}'/>
								<field name="project_def_to" attrs="{'invisible': [('project_filter_selection','!=','def')], 'required': [('project_filter_selection','=','def')]}"
									options='{"quick_create": false}'/>
								<field name="project_input_from"
									attrs="{'invisible': [('project_filter_selection','!=','input')], 'required': [('project_filter_selection','=','input')]}"/>
								<field name="project_input_to"
									attrs="{'invisible': [('project_filter_selection','!=','input')], 'required': [('project_filter_selection','=','input')]}"/>
							</group>
							<field name="project_name_ids"
								attrs="{'invisible': [('project_filter_selection','!=','selection')], 'required': [('project_filter_selection','=','selection')]}" nolabel="1">
								<tree>
									<field name="name" string="Project Name"/>
								</tree>
							</field>	
						</page>
						<page string="Customer">
							<group>
								<field name="cust_filter_selection" on_change="onchange_cust_filter_selection(cust_filter_selection)"/>
								<field name="cust_def_from" attrs="{'invisible': [('cust_filter_selection','!=','def')], 'required': [('cust_filter_selection','=','def')]}"/>
								<field name="cust_def_to" attrs="{'invisible': [('cust_filter_selection','!=','def')], 'required': [('cust_filter_selection','=','def')]}"/>
								<field name="cust_input_from"
									attrs="{'invisible': [('cust_filter_selection','!=','input')], 'required': [('cust_filter_selection','=','input')]}"/>
								<field name="cust_input_to"
									attrs="{'invisible': [('cust_filter_selection','!=','input')], 'required': [('cust_filter_selection','=','input')]}"/>
							</group>
							<field name="cust_name_ids" 
								attrs="{'invisible': [('cust_filter_selection','!=','selection')], 'required': [('cust_filter_selection','=','selection')]}" nolabel="1">
								<tree>
									<field name="name" string="Customer Name"/>
								</tree>
							</field>
						</page>
						<page string="Sort By">
							<field name="sortby_ids">
		                        <tree string="Sort by" editable="bottom">
		                            <field name="seq" />
		                            <field name="sort_by"/>
		                        </tree>
                   			</field>
						</page>
					</notebook>
					<footer>
						<button name="create_vat" string="Print as PDF" type="object" default_focus="1" class="oe_highlight"/>
	                    or
	                    <button name="print_report" string="Print as XLS" type="object" class="oe_highlight" context="{'xls_output':1}"/>
		            	or
	                    <button string="Cancel" class="oe_link" special="cancel"/>
					</footer>
				</form>
			</field>
		</record>

		<record id="action_param_internal_move_report" model="ir.actions.act_window">
			<field name="name">Transfer Report</field>
			<field name="type">ir.actions.act_window</field>
			<field name="res_model">param.internal.move.report</field>
			<field name="view_type">form</field>
			<field name="view_mode">form</field>
			<field name="target">new</field>
			<field name="help">This menu print Transfer Report.</field>
		</record>
		
		<menuitem name="Transfer Report" parent="menu_receiving"
			action="action_param_internal_move_report" id="menu_transfer_internal_move_report" sequence="5"/>

	</data>
</openerp>
